const {Sequelize} = require('sequelize');
const sequelize = new Sequelize('test','root','7687',{
    host:'localhost',
    dialect:'mysql',
   //  operatorsAliases:false,
    
   //  pool:{
   //      max: 5,
   //      min: 0,
   //      acquire: 30000,
   //      idle: 10000
   //  },
    timezone: '+08:00'  //东八时区
});
async function f() {
   console.log('---------------------------------------')
   try {
     let res= await sequelize.authenticate();

      console.log('数据库连接成功...',res);
    } catch (error) {
      console.error('Unable to connect to the database:', error);
    }
    console.log('---------------------------------------') 
}
f()

module.exports = {
    sequelize
};